Evolution of larval gregariousness is associated with host plant specialisation, but not host morphology, in Heliconiini butterflies

Abstract Insect herbivores, such as lepidopteran larvae, often have close evolutionary relationships with their host plants, with which they may be locked in an evolutionary arms race. Larval grouping behaviour may be one behavioural adaptation that improves host plant feeding, but aggregation also comes with costs, such as higher competition and limited resource access. Here, we use the Heliconiini butterfly tribe to explore the impact of host plant traits on the evolution of larval gregariousness. Heliconiini almost exclusively utilise species from the Passifloraceae as larval host plants. Passifloraceae display incredible diversity in leaf shape and a range of anti‐herbivore defences, suggesting they are responding to, and influencing, the evolution of Heliconiini larvae. By analysing larval social behaviour as both a binary (solitary or gregarious) and categorical (increasing larval group size) trait, we revisit the multiple origins of larval gregariousness across Heliconiini. We investigate whether host habitat, leaf defences and leaf size are important drivers of, or constraints on, larval gregariousness. Whereas our data do not reveal links between larval gregariousness and the host plant traits included in this study, we do find an interaction between host plant specialisation and larval behaviour, revealing gregarious larvae to be more likely to feed on a narrower range of host plant species than solitary larvae. We also find evidence that this increased specialisation typically precedes the evolutionary transition to gregarious behaviour. The comparatively greater host specialisation of gregarious larvae suggests that there are specific morphological and/or ecological features of their host plants that favour this behaviour.


| INTRODUC TI ON
Many prey animals have evolved grouping behaviour in response to predation and resource availability.Lepidopteran larvae benefit from aggregating in a number of ways, ranging from increased protection from predators (Greeney et al., 2012;Hunter, 2000;Reader & Hochuli, 2003) to facilitated feeding (Campbell & Stastny, 2015;Clark & Faeth, 1997;Fordyce, 2003;Kawasaki et al., 2009;Rentería et al., 2022).However, larval gregariousness also imposes costs, such as the facilitation of pathogenic infection spread and greater competition for food resources between siblings (e.g.Despland & Le Huu, 2007;Hochberg, 1991;Pescador-Rubio, 2009), creating the context for possible evolutionary trade-offs.Identifying key biotic and ecological factors that frame these trade-offs may be critical for understanding the origin and evolution of gregarious behaviour.
One of the most important of these ecological factors is larval host plants.As herbivores, lepidopteran larvae often have intimate evolutionary relationships with their hosts.These plants can act as a major source of selection for larvae, for example, due to their growth structure or by developing defences against herbivory that larvae must adapt to overcome (Birnbaum & Abbot, 2018;Clark & Faeth, 1997;de Castro et al., 2018;Despland, 2019;Karban, 2011;Thaler et al., 2002;Wittstock & Gershenzon, 2002).
Hostplant traits that may influence the evolution of larval gregariousness include their relative leaf size and anti-herbivory defences.
For example, larger leaves physically offer a wider surface area upon which larvae can collectively feed, which could be important if larvae benefit by remaining close to their group members, such as by reducing predation and parasitism risks (e.g.McClure & Despland, 2011).
Across both short-and long-term scales, plants are rarely passive in their evolutionary relationships with larval herbivores, having evolved a variety of defences in response to being selected as hosts.
Evolutionary adaptations such as tougher leaf surfaces can prevent larval feeding (see Fürstenberg-Hägg et al., 2013 for a review), and trichomes can physically prevent larvae from accessing the leaf tissue, significantly hinder movement, exude harmful substances or may even cause integumental injuries (Despland, 2019;Fürstenberg-Hägg et al., 2013;Gilbert, 1971).The evolution of toxins also helps plants to escape herbivory from many generalists (Birnbaum & Abbot, 2018;Wittstock & Gershenzon, 2002).Furthermore, toxic plants often also display more immediate responses to attack, such as the release of these concentrated toxins into sites of feeding damage (Denno & Benrey, 1997;Karban, 2011).These host plant defences, and the need to overcome them, are thought to be the main promoter of larval aggregation in some systems (Clark & Faeth, 1997;Denno & Benrey, 1997;Despland, 2019;Fordyce & Agrawal, 2001;Kawasaki et al., 2009;Rentería et al., 2022).For example, some larvae will meticulously remove leaf trichome tips to reduce their harmful impact (Cardoso, 2008), but this is likely to be a costly task for an individual.Some gregarious larvae are well-equipped to deal with trichomes and collectively cover them in silk to avoid contact (e.g.Despland, 2019Despland, , 2021;;Rathcke & Poole, 1975).Additionally, collective feeding is thought to benefit larvae that may be susceptible to their host's toxin-release response if they can completely consume the leaf before it is flooded with toxins (Denno & Benrey, 1997).
Aside from their herbivores, ecological drivers from the immediate habitat are likely to shape host plant evolution, which in turn may influence lepidopteran evolution.For example, the spatial distribution, or density, of host plants might vary, affecting how easily females locate suitable oviposition sites.Females may therefore adjust their oviposition strategy in response to the relative difficulty of locating suitable hosts, laying most of their eggs once a suitable host is located if the chances of encountering another are low (Braby & Nishida, 2010).Egg clustering may naturally follow from females laying most of their eggs at one patch, with clumped eggs often giving rise to gregarious larvae (Clark & Faeth, 1998;Korb & Heinze, 2016).
Here, we use the Heliconiini butterfly tribe as a model system to study the influence of specific hostplant traits on the evolution of larval gregarious behaviour.All Heliconiini larvae feed on vines from the Passifloraceae family (de Castro et al., 2018), which offers a shared ecological context within which specific trait differences can be interrogated.Passifloraceae are highly diverse, varying widely in their overall growth morphology and defences against herbivory, such as egg-mimicking structures to deter oviposition, extrafloral nectar rewards to attract predatory ants, and toxic chemical components in their tissues (de Castro et al., 2018).These chemicals form an important line of defence against herbivory from generalist species and, perhaps as a result, some Heliconiini have been driven into specialising on small numbers of hosts.Heliconiini larvae have evolved resistance to their host's toxins, often in correlation with increased specialisation (de Castro et al., 2021;Engler-Chaouat & Gilbert, 2007;Merrill et al., 2013), and the ability to incorporate these toxins into their own chemical defences (Arias et al., 2016;de Castro et al., 2021;Engler-Chaouat & Gilbert, 2007).Additionally, larval social behaviour varies across the Heliconiini, even between very closely related species, with repeated shifts to grouped egg-laying and gregarious larvae (Beltran et al., 2007;McLellan et al., 2023).
Although little is known about the behavioural mechanisms supporting these aggregations, at least some gregarious Heliconiini are trail followers (Pescador-Rubio et al., 2011), suggesting these transitions reflect behavioural adaptations in larvae rather than simple variation in female egg laying.This variation, coupled with tribe-wide estimates of the phylogenetic structure of the Heliconiini (Cicconardi et al., 2023;Kozak et al., 2015), positions these butterflies as a highly useful system with which to study behavioural evolution in response to host plant ecology.
By revisiting the evolution of larval gregariousness in Heliconiini, we take a phylogenetic comparative approach to identify where transitions to larval gregariousness have taken place across the phylogeny.Then, by exploring variation in host plant use between the two behavioural phenotypes, we test hypotheses regarding the host traits that shape the evolution of gregarious behaviour.Specifically, we test (i) whether gregarious larvae use a narrower range of host plant species than solitary larvae.(ii) Whether aggregated larvae are more likely to occur on hosts with larger leaves.(iii) Whether aggregated larvae are more likely to occur on hosts with better defences (here specifically leaf trichomes).And (iv) whether larval behaviour is associated with their host plant's habitat.

| Phylogenies and species lists
We obtained two lists of 52 and 75 butterfly species within the Heliconiini tribe from phylogenies used in Cicconardi et al. (2023) and Kozak et al. (2015), respectively.Kozak et al.'s phylogeny was used for the primary analyses, as this incorporates a larger total number of species (Figure 1a).We also repeated all analyses using Cicconardi et al.'s phylogeny, as this is based on a greater amount of molecular data, and has some minor topological differences, but contains fewer species (see Appendix 1 for these results).Analyses using either phylogeny produced results that do not meaningfully differ.references can be viewed in online repository).Data on larval social behaviour, recorded as a binary variable (0 = solitary, 1 = gregarious) were based on previous classifications of egg clutch size range (Beltran et al., 2007;Brown Jr., 1981), with gregariousness recorded for any species with a range maximum ≥10 (as per Beltran et al.'s, 2007 categorisation).We note that larval aggregations may break down due to environmental conditions in some cases, but these occasions are likely to be rare and not affect our conclusions based on species-wide data in a meaningful way.We additionally analysed social behaviour as a categorical variable [no aggregation (NA)/ small aggregation (SA)/medium aggregation (MA)/large aggregation (LA)] as per records of four levels of increasing 'sociability' based on clutch size (Brown Jr., 1981): Solitary species (no aggregation) were recorded as zero.Small aggregated (SA) species were any with a median clutch size between 5 and 20, medium aggregated (MA) species were any with a median clutch size between >20 and 35 and large aggregated (LA) species were those with a median clutch size >35.

| Larval and host plant data
Use of Passifloraceae host species was mainly taken from published sources (Benson et al., 1975;Beccaloni et al., 2008, as compiled and updated in Kozak, 2016and Young et al., 2023).For a small number of species, all in the 'Aoede' (formerly 'Neruda') clade of the genus Heliconius, we only recorded the host at the genus level (Dilkea), as we lacked species-level data, this meant we could not confirm how many separate species within this genus are used as hosts, despite there being 13 accepted species within Dilkea (POWO, 2022).The four species in the Aoede clade (three of which are included in our data) occur at lower densities than other Heliconius and lack some derived features of the genus.Re-running the analyses with these genus-level entries omitted had no meaningful effect on the results (Table A1).
Trait data on the Passifloraceae hosts were taken from two main sources (Benson et al., 1975;Ulmar & MacDougal, 2004).To determine whether larger leaves predict gregarious larvae, we recorded the mature leaf size of each Passifloraceae in our dataset, given by Ulmar and MacDougal as separate ranges (minimum and maximum) of leaf length and width (both cm).Here, we first calculated the median value of these ranges, then multiplied one median by the other to gain an estimate of the median leaf surface area, assuming an idealised leaf shape, which was used as a final value for what we term 'leaf size' (de Luna Souto et al., 2017).We acknowledge that, given the leaf shape diversity in Passilfora, the leaf surface area calculated here is likely a crude estimate of overall leaf tissue available to larvae.
Leaf size data were heavily left-skewed, and so were log transformed to normalise the distribution for analyses.

| Behavioural transitions
All analyses were performed using R v. 4.1.2(R Core Team, 2013).
We determined the phylogenetic signal of larval social behaviour, as estimated by Pagel's λ (Pagel, 1999), using the 'fitDiscrete' function in geiger (Pennell et al., 2014).The 'fitDiscrete' function estimates evolutionary transition rates between character states of traits with discrete levels, given available tip data, making it ideal for analysing our binary and categorical social behaviour trait.Additionally, 'fitDiscrete' allows for the comparison of models of evolutionary transition between solitary and gregarious states throughout the phylogeny.We used a likelihood ratio test to compare the null model, which assumes equal between-state transition rates across the tree, against the all-rates-different model, which assumes the betweenstate transition rate is different in either direction.We then used the 'make.simmap'function in ape (Paradis & Schliep, 2018), which simulates the character state evolution of a trait under a given model and allows for the exploration of discrete character evolution, making it ideal for our purposes.We used the best-fitting transition rate

| Tests of correlated evolution
We performed tests for correlated evolution between larval social behaviour and hostplant use, hostplant leaf size, hostplant vestiture and hostplant habitat, whilst controlling for phylogenetic effects, using MCMCglmm (Hadfield, 2010).The MCMCglmm package enables regression analyses between traits whilst accounting for potential trait value similarities between species due to relatedness by including the phylogeny as a random effect.We ran MCMC models for 5.1 million iterations, with a 0.1 million burn-in and sample storage frequency of every 500 iterations, with significance of the model calculated as the probability of the parameter value being different from zero (P MCMC ).We also report each model cofactor's posterior mean (P-mean) and its 95% confidence intervals (CI).All analyses were performed using uninformative, parameter-expanded priors for the random effect (G: V = 1, nu = 1, alpha.mu= 0, alpha.V = 1000; R: V = 1, nu = 0.002) and default priors for the fixed effects.Finally, the Heliconiini dataset on host plant use could potentially contain some uncertainties, as it combines records from geographically dispersed Heliconiini species.Hostplant use can vary across populations of single Heliconiini species (e.g.Merrill et al., 2013), potentially leading to overestimations in host use numbers for some species when data are combined over wide geographical ranges.We therefore also performed a more taxonomically limited analysis of a wellstudied community of 14 Heliconiini and nine Passiflora species in Panama (Merrill et al., 2013), as described above.

| Many origins of gregarious larvae in Heliconiini
Overall, we recorded 23 gregarious species (Figure 1a), out of the 75 Heliconiini included in Kozak et al. (2015).Our model estimated there pattern of convergent evolution, the phylogenetic signal of social behaviour is estimated to be very strong (λ = 1), likely reflecting the general tendency for transitions to occur at the base of specious clades.
Transitions between solitary and gregarious states are most likely to occur at different rates, with 11 reversals from gregarious larvae back to solitary larvae across the phylogeny (transition rate = 0.078).This dynamic turnover of social behaviour suggests Heliconiini oviposition behaviour is likely responding to a range of selection pressures.
3.2 | Species with gregarious larvae tend to be hostplant specialists, but there is no effect of leaf morphology Solitary larvae feed on a greater variety of host species than gregarious larvae (P-mean = −0.920,95% CI −1.622 to −0.235, P MCMC = 0.015, Figure 1b).After omitting Passiflora hosts used by fewer than four larval species from the data, we found that P. pedata, which is host to five Heliconiini species, is more likely to be used by solitary larvae.
Additionally, we found that more frequently used hosts by all larvae tend to grow in forest edge habitats (Table 1).Contrary to our predictions, we did not identify a relationship between specific host plant traits and larval social behaviour (Table 1; Figure 2).

| Gregariousness evolves semi-linearly and is preceded by host specialisation
Estimates from our PPA revealed that, from a solitary ancestor, small and medium aggregations are equally likely to evolve next

TA B L E 1
Two separate MCMCglmm sets testing the interactions between larval social behaviour, hostplant use frequency and hostplant traits using Heliconiini larvae included in Kozak et al.'s (2015) phylogeny.
Our model also supports the pathway in which small aggregations evolve before medium aggregations (SA to MA = −0.894),and medium aggregations precede the evolution of large aggregations (MA to LA = −1.032, Figure 3a; Table A2).When host plant number is included in the model set, similar relationships between aggregation sizes as the first model are supported (Figure 3b).Our second model also suggests that a narrowing of larval diet breadth, with regards to hostplant species, precedes transitions to small and medium aggregations (host number to SA = −0.561;host number to MA = −0.253, Figure 3b; Table A2).

| A focused assessment in a single community
Pooling data from multiple Heliconiini populations across a broad geographical range has the potential to skew host plant use data.
Therefore, we repeated our analyses on a less species-diverse, localised community of Heliconiini with an extensive history of ecological study.Using these data, we found no relationship between larval social behaviour and the number of different Passiflora species they feed on (P-mean = −0.925,95% CI −2.673 to 0.637, P MCMC = 0.261).
Whereas we support our finding of a lack of interaction between specific host plant traits and larval behaviour (Table A3), and we again observe that hosts which grow in forest edge habitats tend to be more frequently used by larvae (P-mean = 0.931, 95% CI 0.225-1.621,P MCMC = 0.027, Table A3).

| DISCUSS ION
Larval Lepidoptera have close evolutionary relationships with their host plants, where the phenotype of the latter often influences the traits of the former.We performed phylogenetic comparative  analyses to explore this relationship, focusing on the evolution of Heliconiini larval behaviour in response to their Passifloraceae hosts.We find multiple origins and reversal of gregariousness across the Heliconiini phylogeny, with a tendency for related species to be similar in this trait.We also show that species with gregarious larvae tend to utilise a narrower range of hostplant species than those with solitary larvae, and that this specialisation likely occurs before the evolutionary transition to gregarious behaviour.The association between host plant specialisation and larval gregariousness identified here suggests that there are specific hostplant traits which select for the behaviour; however, we did not identify these traits here.We discuss our findings below.
Our findings support those of Beltran et al. (2007) in that there is likely to have been multiple independent evolutions to gregariousness across the Heliconiini.Larval gregariousness is mostly concentrated in distinct clades across the phylogeny (Figure 1a).This pattern is expressed quantitatively by the high phylogenetic signal of larval social behaviour.Additionally, our data reveal that larval gregariousness, measured by proxy of egg clutch size, increases over evolutionary time in a semi-linear pattern, whereby transitions to small clutches from single eggs tend to precede much larger clutches (Figure 3a).This suggests that there may be physiological constraints to females laying large clusters of eggs, which are incrementally overcome by increasing smaller clutch sizes over evolutionary time, and/or a selection pressure feedback loop which promotes larger clutches once gregariousness evolves.
Our analyses of the relationship between Heliconiini larvae and their host plants support only one of our hypotheses, that gregarious species tend to be more specialised.Our data show that Heliconiini species with solitary larvae tend to feed on a greater variety of host species than gregarious larvae (Figure 1b), and that this increased host specialisation evolves before the transition to gregariousness.We offer two possible explanations for our observed association between larval gregariousness and host plant specialisation.First, species with gregarious larvae might specialise onto hosts with higher nutritional value, which are better positioned to support groups of larvae.This is supported by evidence that females of other butterfly species with gregarious larvae preferentially oviposit on higher-quality hosts (Schäpers et al., 2016), although this preference may also be present in solitary species (Gripenberg et al., 2010).Second, maintaining specialism on toxic hosts, instead of switching to a non-toxic host, may be a response to high inter-specific competition for food resources (e.g.Merrill et al., 2013), as minimising additional, inter-specific competition is likely to be disproportionately important to grouped larvae.The Passiflora have robust chemical defences, yet specialisation often allows larvae to minimise the fitness costs associated with metabolising their hosts' toxins, to a greater degree than achieved by closely related generalist species (e.g. de Castro et al., 2021;Engler-Chaouat & Gilbert, 2007;Merrill et al., 2013).Furthermore, specialists are often better able at converting their host's toxins into their own defence, enhancing their toxicity, evidenced by the finding that both gregarious and specialist Heliconius species are more toxic than solitary and generalist species, respectively (Arias et al., 2016).Increased toxicity resulting from host specialisation might explain our finding that this behaviour evolves before gregariousness for most Heliconiini (Figure 3b), given that larval toxicity most likely precedes transitions to gregariousness (and aposematism before that) across the wider butterfly phylogeny (McLellan et al., 2023).We note that the findings from our focused assessment indicate that, at the local level, host plant specialisation does not significantly differ between solitary and gregarious Heliconiini, despite a similar interaction coefficient to the main model.This lack of significance is likely an effect of low power, indicated by the larger CI range in this second model, and the low numbers of hosts reportedly used by all species across this dataset.
Despite evidence of an effect of host plant diversity on gregarious behaviour, none of the specific host plant traits examined in this study act as predictors of Heliconiini larval gregariousness.
Whereas host plant morphology is thought to influence the evolution of other larval traits, such as anti-predator colour strategy (Prudic et al., 2007), our results do not show similar influences on social behaviour.First, our assumption was that leaves with larger surface areas would provide better 'stages' for larval aggregations.However, we found no effect of leaf size on larval social behaviour, suggesting that even small leaves may be big enough to support groups of larvae if larvae are small or the groups do not contain many individuals.We also predicted an evolutionary link between the presence of host plant leaf trichomes and larval gregariousness, such that aggregated feeding benefits may contribute towards a form of behavioural character displacement, where gregarious larvae specialise on well-defended hosts that solitary species struggle to feed on.However, we found that the presence or absence of Passiflora leaf trichomes has no influence on larval social behaviour in the Heliconiini.This may be because of a lack of specificity in available vestiture data, meaning we could only record vestiture in binary format and lacked information on the length and density of trichomes on most of the pubescent plants.
Other useful trichome data, particularly their structure (whether they are hooked, glandular or neither), are also absent from the literature.These features are likely to be important determinants of how difficult trichome defences are for larvae to overcome (Despland, 2019;Fürstenberg-Hägg et al., 2013).Alternatively, it may simply be the case that, in most instances, aggregating does not improve larvae's ability to overcome trichomes to an extent that it is selected over solitary feeding.
Finally, we expected larval behaviour to vary according to the main habitat of their host plants (and by extension their own habitat), given the potential ecological differences between them.Whilst we are missing habitat data for a number of host species in this study, overall, we found no evidence that habitat predicts larval behaviour.
Our inclusion of habitat type was based on the assumption that it may act as a proxy for ecological factors which potentially influence larval social behaviour, such as host spatial distribution (Braby & Nishida, 2010;Young, 1983).Our negative result may indicate that this assumption is not valid.However, in both our geographically broad and focused datasets, we observed that hosts growing on the edges of forest habitats are favoured by Heliconiini in general, regardless of social behaviour.This finding appears to support evidence of a preference for forest edge plants in various Heliconius species (e.g.Ramos & Freitas, 1999;Seixas et al., 2017).It is, therefore, possible that there is some aspect of this habitat, or the plants within it, that ovipositing females favour over others, although we cannot rule out a bias in how these data are recorded, such as edge habitats being easier to access than forest interiors.
In summary, larval gregariousness is moderately phylogenetically conserved and widespread across the Heliconiini, with multiple origins and reversals.However, the specific ecological drivers of larval gregariousness remain unclear.Variation in hostplant specialisation between solitary and gregarious Heliconiini larvae suggests that there are certain plant traits that promote aggregation; however, available data has not led to their identification.We did not include plant chemistry in our analyses, but this may have given us a better understanding of why larvae specialise onto certain hosts, for example, to escape competition from generalists.Currently, however, data on toxicity variation across populations of larvae and their hosts is lacking.It would also be interest to explore how the greater levels of hostplant tion in gregarious species impact their population dynamics and spatial distribution, both locally and across their geographic range.
Additionally, host spatial density, and whether it varies between habitats, is an important factor missing from our data.Focus on a single Heliconiini community, over multiple seasons, is needed to collect reliable data on the relative spatial distributions of Heliconiini hosts, which is a challenging endeavour.Nevertheless, we have identified that increased host specialisation frequently occurs before the evolution of gregarious behaviour in Heliconiini larvae.This suggests that there are key host plant traits which may predict this behaviour, which require further study to identify.
We collected data on larval 'social behaviour' (a trait including either solitary or gregarious character states) and Passifloraceae host F I G U R E 1 (a) The Heliconiini phylogeny, adapted from Kozak et al. (2015), showing larval social behaviour (solitary = grey tip points, gregarious = blue tips) and the number of separate Passifloraceae used by each species as larval host plants (1-57 represented by increasing tip point size).(b) The probability density of solitary (grey curve) and gregarious (blue curve) larvae which use each number of separate Passifloraceae host species.The majority of gregarious species use <20 hosts.(c) Image examples (with credit) of various Heliconiini larvae.Clockwise from top-left: Agraulis vanilla, Heliconius hewitsoni, Heliconius doris, Eueides isabella.
species of the Heliconiini included in each phylogeny (all data with model from our fitDiscrete analyses to estimate the behavioural character state at each node, and the number of independent transitions to gregariousness throughout the phylogeny.We constrained the root node to the solitary character state based on estimations from a larger butterfly phylogeny that the last common ancestor of Heliconiini was solitary with high (67%) confidence(McLellan et al., 2023).This improved confidence in estimations around basal nodes.When analysing categorical social behaviour, we used the 'ace' function in ape, which estimates the most likely character state at each node given available tip data.This function does not allow the option to constrain the root node, nor the use of the 'all rates different' evolution model with a multi-levelled, discrete variable.We therefore performed the analyses under the 'equal rates' model.Additionally, we performed phylogenetic pathway analyses (PPA) using the package phylopath (von Hardenberg & Gonzalez-Voyer, 2013) on categorical behavioural data and host plant usage data.PPA is used to test hypotheses against a null model (no relationship between traits) regarding the most likely order in which traits typically evolve.Our first model set exclusively tested social behavioural evolution, to test the hypothesis that increasing levels of gregariousness evolve from solitariness in a linear pattern.We included the number of larval host plants used in our second model set to investigate the order in which increased host specialisation and transitions to gregariousness typically evolve.

F
The frequencies at which Passifloraceae with certain traits are used by both solitary (grey bars and points) and gregarious (blue bars and points) Heliconiini larvae.(a) Larval use of host plants separated by their main habitat.(b) Larval use of hosts separated by their vestiture (presence or absence of leaf trichomes).(c) Larval use of host plants separated by their median mature leaf size.Results from phylogenetic pathway analyses (PPA) in which directional evolutionary relationships between traits are estimated.Arrows show the direction of evolutionary interactions, the values next to arrows display the pathway coefficient (strength of the estimated relationship).Between categories of social behaviour, negative coefficients (red arrows) indicate that a loss of the preceding trait occurs before a gain of the subsequent trait.(a) Output from the model looking only at larval social behaviour, showing support for the pathway in which small and medium aggregations occur before the evolution of large aggregations.(b) Output from the model including the degree of larval host specialisation (number of hostplant species used).With the number of hostplant species used as the preceding trait, the negative coefficients indicate that a decrease in the number of host species used (i.e.increased specialisation) precedes a transition to gregariousness.

Host trait Levels P-mean 95% CI P MCMC Lower Upper
Note: Significant interactions are denoted by an asterisk.Model set A: larval social behaviour against host traits (N = 69).Model set B: larval hostplant use frequency against host traits (N = 67).Positive coefficients (P-mean) indicate that host species with the given trait are used by many larvae, whereas negative coefficients indicate the host is less frequently used.